<link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../css/themes/icon.css">

<div id="panel-dictionary" data-options="border:false;width:100%">
  	<div class="well well-small" style="margin-left: 5px;margin-top: 5px">
		
		<p>
			<span class="badge">提示</span>
			在此你可以对<span class="label-info"><strong>数据字典</strong></span>进行编辑!
		</p>
	</div>
		
    <div id="tb-dictionary" style="padding:2px 0">
		<table cellpadding="0" cellspacing="0"> 
			<tr>
				<td style="padding-left:2px">
			
				</td>
			</tr>
		</table>
	</div>
	<table id="dictionary-dg" class="easyui-datagrid" 
		data-options="rownumbers:true,
		animate: true,
		collapsible: true,					
		striped:true,
		border:true,
		//singleSelect:false,
		idField: 'id',
		treeField: 'name',					
		fitColumns: true,
		checkOnSelect:true,
		selectOnCheck:true,
		toolbar:'#tb-dictionary'">
		
		<thead>						
			<tr>
				<th field="ck" checkbox="true" ></th>				
				<th field="name" width="100" halign="center" align="left">字典名称</th>
				<th field="id" width="30" halign="center" align="left">id</th>
				<th field="sortedid" width="30" halign="center" align="left">排序编号</th>
				<th field="bizno" width="40" align="center">字典编号</th>
				<th field="bizcode" width="40" align="center">业务编码</th>
				<th field="fullBizcode" width="80" align="center">完整编码</th>
				<th field="parentName" width="40" align="center">上级字典名称</th>				
				<th field="isUsed" width="40" align="center" data-options="
							formatter:function(value,row){
		            		  if('N'==row.isused)
								return '<font color=green>否<font>';
		            		  else
		            			return '<font color=red>是<font>';   
							}">是否启用</th>
				<th field="comment" width="40" align="center">备注</th>
			</tr>
		</thead>
		
	</table>
	  
  <div id='dictionary-win' class="easyui-window" style="width:900px;height:500px;padding:10px;" 
  	data-options="modal:true,closed:true" >
  		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 10px;">
			<div id="tb-dictionaryEdit" style="height:auto;width:auto">
				<div style="margin-bottom:5px">
				
				</div>  		
		    </div>
			<form id="dept-form" method="post">		
				<fieldset>								
					<input name="id" id="id"  type="hidden"/>
					<input name="parentName" id="parentName"  type="hidden"/>
					<input name="created" id="created"  type="hidden"/>
					<input name="creater" id="creater"  type="hidden"/>
					<input name="dic_type_id" id="dic_type_id"  type="hidden"/>
					
					
					 <table>
						 <tr>
						 	<th>词典名称</th>
							<td><input name="name" id="name" type="text"  style="width:300px;" class="easyui-textbox easyui-validatebox" data-options="required:true"/></td>
						    <th>词典编号</th>
							<td><input name="bizno" id="bizno" placeholder="请输入编号" style="width:300px;" class="easyui-textbox easyui-validatebox" type="text" data-options="required:true"/></td>					
							
						 </tr>
						 <tr>						 	
						    <th>业务编码</th>
							<td><input name="bizcode" id="bizcode" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox"/></td>
							<th>完整编码</th>
							<td><input id="fullBizcode" name="fullBizcode" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox" data-options="editable:false"/></td>							
						 </tr>
						 <tr>						    
							<th>词典类型</th>
							<td><input id="dic_type" name="dic_type" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox"/></td>
							<th>处理部门</th>
							<td><input name="duties_dept" id="duties_dept" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox"/></td>
						 </tr>
						 <tr>
						    <th>上级词典</th>
							<td><input name="parentid" id="parentid" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox"/></td>
							<th>排序编号</th>
							<td><input id="sortedid" name="sortedid" type="text" style="width:300px;" class="easyui-textbox easyui-validatebox"/></td>
						 </tr>
						 <tr>
						 <th>是否启用</th>
							<td>
							<select id="isUsed" class="easyui-combobox" name="isUsed" style="width:300px;" data-options="required:true">
								<option value="Y">是</option>
								<option value="N">否</option>
							</select></td>
						<th>字段内容</th>
							<td><input id="dic_value" name="dic_value" type="text"style="width:300px;"  class="easyui-textbox easyui-validatebox"/></td>
						 </tr>
						 <tr>
							<th>描述</th>
							<td colspan="3"><input class="easyui-textbox" id="remarks" name="remarks"  style="width: 680px;height: 200px;" data-options="multiline:true"></input></td>
						</tr>
					 </table>
				</fieldset>
			</form>
		</div>
	</div>
</div> 

 
<script>
requirejs(['dictionaryModule','domReady!'],function(dept,doc){
	dept.init(doc);
});	
</script>

